﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using Object = System.Object;

public class UIBase : MonoBehaviour
{
    protected virtual void Awake()
    {
        
    }

    public virtual void Open(params Object[] parameters)
    {

    }

    public virtual void Close()
    {

    }

    protected void OpenUI<T>(UIPanel panel,params System.Object[] parameters)where T:UIBase
    {
        UIMgr.Instance.OpenUI<T>(panel, parameters);
    }

    protected void OpenUI<T>(UIPanel openPanel,UIPanel closePanel, params System.Object[] parameters) where T : UIBase
    {
        UIMgr.Instance.OpenUI<T>(openPanel, closePanel, parameters);
    }
}
